home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / osr5 / sco / scripts / admin / newinittab < prev    next >
Encoding:
Text File  |  1997-08-26  |  998 b   |  37 lines

  1. #!/bin/sh
  2. # @(#) newinittab.sh 1.0 94/06/27
  3. # 93/11/19 John H. DuBois III (john@armory.com)
  4. # 94/06/27 Added help.
  5.  
  6. if [ $# -gt 0 ]; then
  7.     name=$0
  8.     echo \
  9. "$name: Build new inittab file & instruct init to read it.
  10. $name uses idmkinit to construct a new inittab file from the init.base and
  11. init.d files, copies it to /etc/inittab after saving the old inittab to
  12. inittab-, and then sends init a signal instructing it to read the new inittab
  13. file.  This allows init changes to be made to the appropriate base file &
  14. propogated to /etc/inittab without having to duplicate them there or build a
  15. new kernel."
  16.     exit 0
  17. fi
  18.  
  19. if /etc/conf/bin/idmkinit; then :; else
  20.     echo "idmkinit failed" 1>&2
  21.     exit 1
  22. fi
  23.  
  24. inittab=/etc/inittab
  25. newinittab=/etc/conf/cf.d/inittab
  26. if cp $inittab $inittab-; then :; else
  27.     echo "copy of inittab to inittab- failed" 1>&2
  28.     exit 1
  29. fi
  30.  
  31. if cat $newinittab > $inittab; then :; else
  32.     echo "copy of new inittab onto /etc/inittab failed" 1>&2
  33.     exit 1
  34. fi
  35.  
  36. init q
  37.